package com.smartfast4j.springboot.mongodb.demo.bean;

import org.springframework.data.annotation.Id;

/**
 * 定义一个简单的实体
 * Created by gacl on 2017/11/20.
 */
public class User {

    @Id
    private Long id;

    private String username;

    private Integer age;

    public User(Long id, String username, Integer age) {
        this.id = id;
        this.username = username;
        this.age = age;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", age=" + age +
                '}';
    }
}
